package net.oschina.arvin.logsys;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author Arvin
 * @time 2017/11/15 9:48
 */
public class LogsysTest {

    public static void main(String[] args) {

        ApplicationContext acx = new ClassPathXmlApplicationContext("classpath:applicationContext.xml");

        int beanDefinitionCount = acx.getBeanDefinitionCount();

        System.out.println("BeanDefinitionCount: " + beanDefinitionCount);

        // 开启Log4j2 日志初始化日志
        // System.setProperty("log4j2.debug", "true");

        org.slf4j.Logger slf4jLogger = org.slf4j.LoggerFactory.getLogger("SEL4J");
        slf4jLogger.info("This is SLF4J Logger");

        org.apache.logging.log4j.Logger log4jLogger = org.apache.logging.log4j.LogManager.getLogger("Log4J");

        log4jLogger.info("This is LOG4J Logger");
    }
}
